<template>
  <el-row>
    <h3>班表查询</h3>
    <form-componet inline :form-label="formModelLabel" :form-model="formModelCompnet">
      <el-button @click.prevent="onsubmit" type="primary" v-loading.fullscreen.lock="fullscreenLoading">
        提交
      </el-button>
    </form-componet>
    <el-divider></el-divider>
  </el-row>
</template>

<script>
import FormComponet from "../../components/FormComponet";

export default {
  name: "Schedule",
  components: {
    FormComponet
  },
  data() {
    return {
      fullscreenLoading: false,
      formModelCompnet: {
        dateList: []
      },
      formModelLabel: [
        {
          model: "dateList",
          type: "datePickerList",
          name: "查询日期"
        }
      ]
    };
  },
  methods: {
    onsubmit() {
      this.fullscreenLoading = true;
      window.open("/schedule/scheduleEmp?sDate=" + this.formModelCompnet.dateList[0] + "&eDate=" + this.formModelCompnet.dateList[1], "_parent");
      setTimeout(() => {
        this.fullscreenLoading = false;
      }, 2000);
    }
  }
};
</script>

<style scoped></style>
